#ifndef CNBASEITEM_H
#define CNBASEITEM_H


#include "cnitemcommon.h"
#include <QGraphicsObject>


class CNArrowItem;

class CNBaseItem : public CNItemCommon
{
    Q_OBJECT
    //Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged);
public:
    explicit CNBaseItem(QGraphicsItem *parent = nullptr);

    /*QString name() const;*/

    void addArrow(CNArrowItem* arrow);
    QRectF boundingRect() const override;

protected:
    QVariant itemChange(GraphicsItemChange change, const QVariant& value) override;


private:
    // CN::DiagramType m_Type;
    QList<CNArrowItem*> m_arrows;

public slots:
    // void setName(QString name);
    void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override;
    void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) override;
//signals:
//    void nameChanged(QString name);
};

#endif // CNBASEITEM_H
